﻿namespace DataScripter.Scripting.Filters
{
    public class WhereFilter : IWhereFilter
    {
        public string WhereClause { get; private set; }

        public WhereFilter(string whereClause)
        {
            WhereClause = whereClause;
        }

        public string ProduceFilter()
        {
            return WhereClause;
        }

        public string ProduceWhereClause()
        {
            string netWhereClause = ProduceFilter();
            return string.IsNullOrEmpty(netWhereClause) ? string.Empty : " WHERE " + netWhereClause;
        }
    }
}
